<%--
  Created by IntelliJ IDEA.
  User: 26479
  Date: 2022/2/1
  Time: 1:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title></title>
</head>
<body>
<div class="layui-col-sm12 layui-col-md5" style="margin-right: 10px;">
    <div class="layui-card" style="background-color: #FAFAFA">
        <div class="layui-card-header">系统公告</div>
        <div class="layui-card-body" style="min-height: 300px;min-width: 300px;">

        </div>
    </div>
</div>
<div class="layui-col-sm12 layui-col-md6">
    <div class="layui-card" style="background-color: #FAFAFA">
        <div class="layui-card-header">图书类型</div>
        <div class="layui-card-body" style="min-height: 300px;min-width: 300px;">
            <div id="chart" style="width:600px;height:300px;"></div>
        </div>
    </div>
</div>
<div class="layui-col-sm12 layui-col-md12" style="margin-top: 10px;">
    <div class="layui-card" style="background-color: #FAFAFA">
        <div class="layui-card-header">系统公告</div>
        <div class="layui-card-body" style="min-height: 230px;min-width: 300px;">

        </div>
    </div>
</div>
<script src=" https://cdn.staticfile.org/echarts/4.3.0/echarts.min.js"></script>
<script type="text/javascript">
    var mychart = echarts.init(document.getElementById('chart'));
    mychart.setOption({

        tooltip : {

            trigger: 'item',

            formatter: "{a} {b} : {c} ({d}%)"

        },

        legend:{

            orient: 'vertical',

            left: 'left',

            data: []

        },

        series : [

            {

                name: '满意度',

                type: 'pie',

                radius : '55%',

                center: ['50%', '60%'],

                data:[

                    {"name":"满意","value":"1"},

                    {"name":"基本满意","value":"1"},

                    {"name":"不满意","value":"1"},

                    {"name":"不满意","value":"1"},

                    {"name":"基本满意","value":"1"}

                ],

                itemStyle: {

                    emphasis: {

                        shadowBlur: 10,

                        shadowOffsetX: 0,

                        shadowColor: 'rgba(0, 0, 0, 0.5)'

                    }

                }

            }

        ]

    });

    function changePieData(){

        var option =  mychart.getOption();

        var list =[{"name":"满意","value":"5"},{"name":"基本满意","value":"5"},{"name":"不满意","value":"5"},{"name":"不满意","value":"5"},{"name":"基本满意","value":"5"}];

        option.series[0].data = list;

        mychart.setOption(option);

    }
</script>
</body>
</html>
